/***********************************************************************************************************************************
 *    Name: Audit_Login.sql
 *  Author: Frank Figearo — http://www.sqlnerd.me/ — frank@sqlnerd.me
 * Summary: 
**/
CREATE SERVER AUDIT [Audit-Login]
	TO FILE (FILEPATH = N'D:\MSSQL10_50.MSSQLSERVER\MSSQL\LOG\', MAXSIZE= 1 GB, MAX_ROLLOVER_FILES= 128, RESERVE_DISK_SPACE= ON)
	WITH(QUEUE_DELAY= 6000, ON_FAILURE= CONTINUE);
ALTER SERVER AUDIT [Audit-Login] WITH (STATE= ON);
GO
CREATE SERVER AUDIT SPECIFICATION [AuditSpecification-Login] FOR SERVER AUDIT [Audit-Login] ADD (SUCCESSFUL_LOGIN_GROUP);
ALTER  SERVER AUDIT SPECIFICATION [AuditSpecification-Login] WITH (STATE= ON);
GO